<template>
	<header class="header">
				<h1>todos</h1>
				<input 
    class="new-todo" 
    placeholder="What needs to be done?" 
    autofocus
    v-model.trim="msg"
    @keyup.enter="add"
    >
			</header>
</template>

<script>
export default {
 data() {
  return{
   msg:''
  }
 },
 methods:{
  add() {
   this.$emit('addFn',this.msg)
   this.msg = ''
  }
 }
}
</script>

<style>

</style>